from db_utils import D

if __name__ == '__main__':
    sql = "select * from student"
    db = D("student")
    re = db .selectAll(sql)
    stu = open("stu.txt",mode="a",encoding="utf-8")
    for i in re:
        aa = "{},{},{}\n".format(i[1],i[2],i[3])
        stu .write(aa)
    stu.close()